package com.feng.demo.jakartacommons.mina.codec;

import java.nio.charset.Charset;

import org.apache.log4j.Logger;

public class InfoXml {
	private static Logger logger = Logger.getLogger(InfoXml.class);
//  private short tag;  
    private String xml;  
      
    public short getTag(){  
        return (short)0x0001;  
    }  
      
    public int getLen(Charset charset){  
        int len = 0;  
        try {  
            len += xml.getBytes(charset).length;  
        } catch (Exception e) {  
            logger.error("数据错误", e);  
            e.printStackTrace();  
        }  
        return len;  
    }  
      
//  public short getTag() {  
//      return tag;  
//  }  
//  public void setTag(short tag) {  
//      this.tag = tag;  
//  }  
    public String getXml() {  
        return xml;  
    }  
    public void setXml(String xml) {  
        this.xml = xml;  
    }
}
